<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>品优购商品详情页</title>
    <!-- 引入第3方辅助插件css -->
    <link rel="stylesheet" href="../lib/fontawesome/css/font-awesome.css">
    <link rel="stylesheet" href="../lib/mui/css/mui.css">
    <!-- 引入公共样式css -->
    <link rel="stylesheet" href="../css/comment.css">
    <!-- 引入当前页面样式css -->
    <link rel="stylesheet" href="../css/goods_detail.css">
</head>

<body>
    <!-- 页面顶部 -->
    <header id="header" class="mui-bar mui-bar-nav header_bgc">
        <h1 class="mui-title">商品详情</h1>
        <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
    </header>

    <!-- 商品详情主体内容 -->
    <div class="pyg_main">
        <!-- 轮播图与商品标题 -->
        <div class="banner_title">
            <!-- 轮播图模板 占位 -->

            <!-- 商品标题模板 占位 -->
        </div>

        <!-- 购买配送信息 -->
        <ul class="buy_message">
            <li>
                <span>已选</span>
                <span>白色</span>
            </li>

            <li>
                <span>促销</span>
                <span>是</span>
            </li>

            <li>
                <span>送至</span>
                <span>上海市</span>
            </li>

            <li>
                <span>运费</span>
                <span>免运费</span>
            </li>
        </ul>

        <!-- 选项卡 -->
        <div class="goods_info">
            <!-- 标题 -->
            <div id="segmentedControl" class="mui-segmented-control">
                <a class="mui-control-item mui-active" href="#item1">图文详情</a>
                <a class="mui-control-item" href="#item2"> 规格参数 </a>

            </div>
            <!-- 内容 -->
            <div class="tap_content">
                <!-- 选项卡内容模板 占位 -->
            </div>
        </div>
    </div>

    <!-- 页面底部 -->
    <footer class="pyg_footer">
        <a href="../index.html">
            <span class="fa fa-weixin"></span>
            <div>客服</div>
        </a>
    
        <a href="./category.html">
            <span class="fa fa-phone"></span>
            <div>客服</div>
        </a>
    
        <a id="buy" href="javascript:;">立即购买</a>

        <a id="join_car" href="javascript:;">加入购物车</a> 
    </footer>
</body>
<!-- 引入第3方辅助插件js -->
<script src="../lib/mui/js/mui.min.js"></script>
<!-- 引入zepto.js -->
<script src="../lib/zepto/zepto.js"></script>
<!-- 引入模板引擎 -->
<script src="../lib/arttemplate/template-web.js"></script>
<!-- 引入公共js -->
<script src="../js/comment.js"></script>
<!-- 引入当前页面的js -->
<script src="../js/goods_detail.js"></script>

<!-- template模板 -->
<!-- 轮播图 与 商品标题 -->
<script type="text/template" id="gdBanTpl">
    <!-- 轮播图 -->
    <div class="mui-slider">
        <!-- 轮播图片 -->
        <div class="mui-slider-group mui-slider-loop">
            <!--支持循环，需要重复图片节点-->
            <div class="mui-slider-item     mui-slider-item-duplicate"><a href="#"><img src="{{pics[pics.length-1].pics_mid_url}}" /></a></div>
            {{each pics value index}}
            <div class="mui-slider-item"><a href="#"><img  src="{{value.pics_mid_url}}" /></a></div>
            {{/each}}
            <!--支持循环，需要重复图片节点-->
            <div class="mui-slider-item     mui-slider-item-duplicate"><a href="#"><img src="{{pics[0].pics_mid_url}}" /></a></div>
        </div>
        <!-- 轮播图片对应索引 -->
        <div class="mui-slider-indicator">
            {{each pics value index}}
            {{if index == 0}}
            <div class="mui-indicator mui-active"></div>
            {{else}}
            <div class="mui-indicator"></div>
            {{/if}}
            {{/each}}
        </div>
    </div>

    <!-- 商品标题 -->
    <div class="goods_np">
        <div class="goods_name">{{goods_name}}</div>
        <div class="goods_price">￥{{goods_price}}</div>
    </div>
</script>

<!-- 选项卡 -->
<script type="text/template" id="tapTpl">
    <div id="item1" class="mui-control-content mui-active">  
          {{@goods_introduce}} 
    </div>
    <div id="item2" class="mui-control-content">
        <ul>
            {{each attrs value index}}
                <li>
                    <div class="item_name">{{value.attr_name.split('-')[0]}}</div>
                    <div class="item_value">
                        <span>{{value.attr_name.split('-')[1]}}</span>
                        <span>{{value.attr_value}}</span>
                    </div>
                </li>
            {{/each}}
        </ul>
    </div>
</script>

</html>